const TableObj = require('../modules/Table');

let TableController = {
    get_tableInfo: async function(req, res){
        let resultDate = await TableObj.getTableInfo();
        res.send(resultDate);
    },

    post_tableAdd: async function(req, res){
        let data = req.body;
        let resultDate = await TableObj.addTable(data);
        res.send(resultDate);
    },

    post_tableEdit: async function(req, res){
        let data = req.body;
        let resultDate = await TableObj.editTable(data);
        res.send(resultDate);
    },

    post_tableDel: async function(req, res){
        let data = req.body;
        let resultDate = await TableObj.delTable(data);
        res.send(resultDate);
    }
}
module.exports = TableController;